﻿#region File and License Information
/*
<File>
	<License>
		Copyright © 2009 - 2017, Daniel Vaughan. All rights reserved.
		This file is part of Calcium (http://calciumsdk.net), 
		which is released under the MIT License.
		See file /Documentation/License.txt for details.
	</License>
	<CreationDate>2010-08-21 14:42:15Z</CreationDate>
</File>
*/
#endregion

using System;

namespace Outcoder
{
	/* TODO: [DV] Comment. */
	public static class EventHandlerExtensions
	{
		[Obsolete("Use yourEvent?.Invoke(...)")]
		public static void Raise<TEventArgs>(
			this EventHandler<TEventArgs> eventHandler, object sender, TEventArgs e) 
			where TEventArgs : EventArgs
		{
			eventHandler?.Invoke(sender, e);
		}

		[Obsolete]
		public static void Raise(this EventHandler eventHandler, object sender, EventArgs e)
		{
			eventHandler?.Invoke(sender, e);
		}
	}
}
